package no.hio.wsclient.dao;

import java.util.List;
import java.util.NoSuchElementException;

import no.hio.wsproviderstock.StockItem;

/**
 * Interface for StockItem webservice 
 * @author Henning Gundersen
 *
 */
public interface StockItemDAO
{
	/**
	 * @return List<StockItem> list with all stockItems in datasource
	 */
	public List<StockItem> findAllStockItems();

	/**
	 * @param productID
	 * @return StockItem 
	 */
	public StockItem findByProductID(int productID);
	
	/**
	 * @param StockItem
	 * @throws UnsupportedOperationException
	 */
	public void insertStockItem(StockItem stockItem) throws UnsupportedOperationException;
	
	/**
	 * @param StockItem
	 * @throws NoSuchElementException
	 */
	public void removeStockItem(StockItem stockItem) throws NoSuchElementException;
	
	/**
	 * @param StockItem
	 * @throws NoSuchElementException
	 */
	public void updateStockItem(StockItem stockItem) throws NoSuchElementException;

}
